package page.sample;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;

import page.MyFirstWebPage;
import entity.User;

public class PrivateOfficePage extends WebPage {

	public PrivateOfficePage(final User user) {
		add(new Label("message", "Hello, " + user.getName() + " "
				+ user.getLastname()));

		add(new Link("ShowFlight") {

			@Override
			public void onClick() {
				setResponsePage(new FlightPage(user));
			}

		});

		add(new Link("ShowTicket") {

			@Override
			public void onClick() {
				setResponsePage(new ShowTicketPage(user));

			}

		});

		add(new Link("exit") {

			@Override
			public void onClick() {
				setResponsePage(new MyFirstWebPage());

			}

		});
	}

}
